<?php
define('BASE_PATH', dirname(dirname(realpath(__FILE__))) . "/"); // 框架所在目录
define('CORE', BASE_PATH . 'core'); // 核心文件
define('APP', BASE_PATH . 'app'); // 项目
define('VENDOR', BASE_PATH . 'vendor'); // vendor
define('VIEWS', APP . '/view'); // 视图目录
define('STORAGE', BASE_PATH . 'storage');
define('LOG_PATH', STORAGE . '/logs'); // 日志路径

// 自动加载
require_once BASE_PATH . '/config/cache_key.php';
require_once CORE . '/common/helper.php';
require_once CORE . '/common/DotEnv.php';
require_once CORE . '/lib/Medoo.php';
include CORE . '/Server.php';
spl_autoload_register('\core\Server::load');
require_once('../vendor/autoload.php');
(new DotEnv(BASE_PATH))->load();

use Symfony\Component\Console\Application;
use app\cmd\StatGroupPvCmd;
use app\cmd\StatPvBakCmd;
use app\cmd\TestCmd;

$app = new Application();
$app->add(new StatGroupPvCmd());
$app->add(new StatPvBakCmd());
$app->add(new TestCmd());
$app->run();
